package com.rz.htk.order.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.rz.htk.order.entity.OrderTrack;
import com.rz.htk.order.mapper.OrderTrackMapper;
import com.rz.htk.order.service.IOrderTrackService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class OrderTrackServiceImpl extends ServiceImpl<OrderTrackMapper, OrderTrack> implements IOrderTrackService {

    @Resource
    private OrderTrackMapper trackMapper;

    @Override
    public int deleteByAfterCode(String afterCode) {
        return trackMapper.deleteByAfterCode(afterCode);
    }

    @Override
    public List<OrderTrack> getByAfterCodes(List<String> afterCodes) {
        QueryWrapper<OrderTrack> wrapper = new QueryWrapper<>();
        wrapper.in("after_code",afterCodes);
        return list(wrapper);
    }
}
